package com.zzj.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzj.entity.PatientAppointment;
import com.zzj.mapper.PatientAppointmentMapper;
import com.zzj.service.IPatientAppointmentService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zzj
 * @since 2023-05-12
 */
@Service
public class PatientAppointmentServiceImpl extends ServiceImpl<PatientAppointmentMapper, PatientAppointment> implements IPatientAppointmentService {

    @Override
    public boolean setAppointmentStatus(int id, int status) {

        return this.update(new PatientAppointment(),
                new LambdaUpdateWrapper<PatientAppointment>()
                        .eq(PatientAppointment::getId, id)
                        .set(PatientAppointment::getStatus, status));

    }
}
